import os

print(os.path.abspath(__file__))

print(os.path.dirname(__file__))

print(os.path.abspath('复习.py'))

print(os.path.dirname(os.path.dirname(__file__)))

name = 'mary'
age = 19

str1 = '姓名：{1};年纪：{0}'.format(name, age)
print(str1)

